GetMouse
GetMouse
Obtain the current position of the mouse Point *localPt ; receives location in local coordinates GetMouse obtains the current mouse location in coordinates local to the current grafPort.
localPt is the address of a 4-byte Point structure. Upon return, it will contain the location of the mouse at the time of the call, in local
coordinates.
expressed in global screen coordinates.
Notes: Since all events ( including nullEvents) return the current mouse
coordinates, GetMouse is not often needed. However, it is handy for maintaining the correct cursor. For instance, if the mouse moves into a text
area, you may want to use SetCursor to change the arrow cursor into an iBeamCursor, and vice versa. You would put this code into your main event
Another place to use this function is in a dialog event filter (see
cursor when the mouse crosses into an editText item.
During a drag operation, you can intercept DragHook to monitor the
motion.
button.